package StringBuilder_note;

import java.util.StringJoiner;

public class StringJoiner_note {
    public static void main(String[] args) {
        StringJoiner sj = new StringJoiner(",","[","]");
        //拼接方便接上其他符号
        //2.添加元素
        sj.add("aaa").add(" ddd").add("ccc");//添加是 字符串
        int len = sj.length();
        System.out.println(len);
        System.out.println(sj.toString());//转换回 string字符串
    }//偷懒法
}
